package abacab.serialization.huffman;

/**
 * Represents a node in the binary tree
 */
public class IntermediaryNode extends Node {
	/** The left node */
	private final Node	left;

	/** The right node */
	private final Node	right;

	/**
	 * Create the node
	 * 
	 * @param left
	 *          the node to the left
	 * @param right
	 *          the node to the right
	 */
	public IntermediaryNode(Node left, Node right) {
		super(left.getWeight() + right.getWeight());
		this.left = left;
		this.right = right;
	}

	@Override
	public char getCharacter() {
		return 0;
	}

	@Override
	public final Node getLeft() {
		return this.left;
	}

	@Override
	public final Node getRight() {
		return this.right;
	}
}